/*
 * @Descripttion: 
 * @version: 
 * @Author: 
 * @Date: 2022-05-09 13:26:25
 * @LastEditors: weidelong
 * @LastEditTime: 2022-05-10 16:59:04
 */
import request from "../../request.js"

// 图片上传
export function uploadImg(params) {
    return request({
        url: '/uploadImg',
        method: 'post',
		headers: {
		    'Content-Type': 'multipart/form-data'
		},
        data: params
    })
}

// 文章上传
export function uploadArticle(params) {
    return request({
        url: '/addNewArticle',
        method: 'post',
        data: params
    })
}

// 获取文章列表
export function getArticleList(paramater) {
    return request({
        url: '/getArticleList',
        method: 'get',
        params: paramater
    })
}
// 获取文章列表
export function getMyArticle(paramater) {
    return request({
        url: '/getMyArticle',
        method: 'get',
        params: paramater
    })
}
// 获取单个文章详情
export function getArticleDetail(paramater) {
    return request({
        url: '/getArticle',
        method: 'get',
        params: paramater
    })
}

// 文章审核
export function editArticle(params) {
    return request({
        url: '/editArticle',
        method: 'post',
        data: params
    })
}

// 获取全部文章
export function getAllArticleList(paramater) {
    return request({
        url: '/getAllArticles',
        method: 'get',
        params: paramater
    })
}

// 模糊查询
export function getFuzzyQueryArticle(paramater) {
    return request({
        url: '/fuzzyQueryArticle',
        method: 'get',
        params: paramater
    })
}

// 文章删除
export function deletArticle(params) {
    return request({
        url: '/deletArticle',
        method: 'post',
        data: params
    })
}